// 邮箱的验证方法
var checkEmail = (rule, value, callback) => {
  const regEmail = /^\w+@\w+(\.\w+)+$/
  if (regEmail.test(value)) {
    return callback()
  }
  callback(new Error('请输入合法的邮箱'))
}
// 手机号验证方法
var checkMobile = (rule, value, callback) => {
  const regMobile = /^1[34578]\d{9}$/
  if (regMobile.test(value)) {
    return callback()
  }
  callback(new Error('请输入合法的手机号'))
}
export { checkEmail, checkMobile }
